<?php
/**
 * Created by PhpStorm.
 * User: Mloong
 * Date: 2019/4/17
 * Time: 14:47
 */

namespace app\api\model;


class Tourism extends BaseModel
{
    public static function saveData($data)
    {
        $id_card = $data['id_card'];
        $num = self::where('id_card','=', $id_card)
            ->count();
        if($num >= 2){
            return false;
        }
        $data['add_time'] = now_time();
        return self::create($data);
    }
}